package com.healthdata.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.healthdata.entity.MedicalInstitutionsRegionYear;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface MedicalInstitutionsRegionYearMapper extends BaseMapper<MedicalInstitutionsRegionYear> {

    //根据省份名和年份找id
    @Select("SELECT id FROM medical_institutions_region_year WHERE region = #{region} AND year = #{year}")
    int getIdByRegionAndYear(@Param("region") String region, @Param("year") int year);

}
